#include <iostream>
#include <string>

using namespace std;

// T 模板类型 int double
template <class T>
void swap(T & val_1, T & val_2)
{
    T temp = val_1;
    val_1 = val_2;
    val_2 = temp;
}

template <class T>
void show(T val_1, T val_2)
{
    cout << "val_1 = " << val_1 << endl;
    cout << "val_2 = " << val_2 << endl;
}

int main(int argc, char const *argv[])
{
    string n1 = "张三";
    string n2 = "李四";
    swap(n1, n2);
    show(n1, n2);
    
    return 0;
}
